package main;

public class Pack<T> {
private T data;
private int price;
private int index;
public int getPrice()
{
	return price;
}
public T getData()
{
	return data;
}
public int getIndex()
{
	return index;

}

public String toString() {
	StringBuilder ans = new StringBuilder(data.toString());
	ans.append(" price: ");
	ans.append(price);
	return ans.toString();
	
}

public Pack (T data,int price)
{
	this.data=data;
	this.price=price;
}
public Pack (T data,int price,int index)
{
	this.data=data;
	this.price=price;
	this.index=index;
}

/*
public boolean isCheaperPack(Pack<?> otherPack) {
	return (this.price<=otherPack.getPrice());
}
*/

}
